Skip to content

inkling2: Small's pin moves to revision 885d78bf, log_scaling_n_floor 8192 in the fixtures and the contract reference - #6215

Merged
ashhart merged 3 commits into
ashhart:mainfrom
Nipale-ai:inkling2-pin-8192
Dec 5, 2026
Merged

ashhart merged 3 commits into
ashhart:mainfrom
Nipale-ai:inkling2-pin-8192

Conversation

@Nipale-ai

Copy link
Copy Markdown
Contributor

What this changes

Before, the Inkling 2 Small pin named revision 2ad1157 with log_scaling_n_floor 128000: in tools/zig/inkling2_fixtures.py:11, in zig/src/families/inkling2/fixtures/config.json:20 and in the attention contract's reference (floor_pos, now at zig/src/core/contract/inkling2_attn_ref.zig:15). After, the pin names 885d78bfca61a7e9a498e33cfa7ad35850533b8c, the head of thinkingmachines/Inkling-2-Small (2026-11-20), and the fixtures and the reference carry 8192. This is the pin move asked for in #3476 on 11-22.

  • tools/zig/inkling2_fixtures.py: RELEASE names the new revision.
  • fixtures/config.json: rebuilt by the tool. log_scaling_n_floor is the only line that differs between the two revisions.
  • fixtures/chat_template.jinja: rebuilt by the tool; the release's template now wraps an assistant message in generation markers. It is byte for byte fixtures/release_chat_template.jinja, which this change leaves in place.
  • fixtures/prompt_cases.json: rebuilt by the tool. Only its files line changes: the 24 chat cases and the 6 raw cases (prompts, ids, decoded text) are equal under both templates. mini_tokenizer.json and mini_cases.json do not change, since tokenizer.json has the same bytes at both revisions.
  • zig/src/core/contract/inkling2_attn_ref.zig: floor_pos is 8192. The tau pins move to positions 8191, 8192, 300000 and 1048575, the position that must still give 1 moves from 127998 to 8190, and the tauAt test keeps a second floor (128000) under test.
  • zig/src/families/inkling2/config_test.zig: Small's parse test now states log_floor 8192, as the Mini and tiny Mini tests already do.
  • zig/src/families/inkling2/exl3_pack_test.zig: Small's config carries 8192 now, so the second floor admitSmallConfig is shown to take is 128000.
  • THIRD_PARTY_NOTICES.md: the revision.

What the new value reaches:

  • Serving reads the floor from the checkpoint's config.json (config.zig:274); that is unchanged.
  • The CUDA attention contract passes ref.floor_pos to tf_ink2_prep and takes ref.tau for the expected value (zig/tests/cuda/contract_inkling2_attn_prep.zig:164, :204), so its global prep entry and the "without tau" control now run at 8192. The GPU run is under Checks.
  • The HIP contract gives the kernel each model's own floor (zig/tests/hip/contract_inkling2_prep.zig:195) and takes tauAt with it (:263); it does not read floor_pos. The Metal contract has a reference of its own with 8192 (zig/tests/contract/metal_inkling2_attention_ref.zig:58) and does not import this one.
  • exl3_config.admitSource (exl3_config.zig:116-119) requires the text fields of a pack's source config to equal those of the pinned config.json. After this change a source config with 8192 passes that comparison and one with 128000 returns error.InklingGeometry. On main only exl3_pack_test.zig calls it, and no test covers that refusal.
  • exl3_pack.admitSmallConfig takes both floors (exl3_pack.zig:81) and is not touched.

Not touched: fixtures/tiny_config.json (tiny-random/inkling-2@0a57c72e has 128000 itself), fixtures/release_chat_template.jinja and kernels_test.zig:67 (a recorded launch with stand-in values).

#4841 (open) adds zig/src/families/inkling2/shape.zig with log_floor: f32 = 128000 as a default and a test that expects 128000 from fixtures/config.json. The two changes share one file, THIRD_PARTY_NOTICES.md, in different sections. The one that lands second has to move that expectation to 8192.

Not part of this change: #4125's entry that plants a non-finite value at a masked key inside a loaded tile. It follows as its own pull request.

Checks on this head

  • Head commit: 07044a4be, base f25ae9711.
  • Lean checker (python3 tools/pr_check.py --base origin/main, which runs it): 0 errors, lean 88 vs 88, 0 new; three advisory warnings (no --pr number yet, and two inherited import cycles).
  • Tests run on macOS (Apple silicon, Zig 0.17.0), with the command and the counts of its Build Summary line:
    • zig build test-kernel-contract --summary all: 399 passed, 0 failed.
    • zig build test-inkling2-host --summary all: 236 passed, 0 failed, 7 skipped.
    • zig build test-inkling2-cuda-host --summary all: 111 passed, 0 failed.
    • zig build test-server-inkling2-reply-host --summary all: 102 passed, 0 failed, 1 skipped.
    • zig build test-inkling2-thinking-budget-host --summary all: 44 passed, 0 failed. These two steps hold the server tests that load fixtures/chat_template.jinja (their names start with Inkling 2 reply: or Inkling 2 thinking budget:).
    • zig build test-inkling2-metal-host --summary all: 319 passed, 1 failed, 12 skipped. The failure is TFQ5 Metal: Split-K heuristic saturates cores on small-R projections (expected 1, found 2); it fails the same way on the base f25ae9711 on this machine, with the same counts, and is reported in Metal host tests: two failures on main on an M5 Ultra (gpu_tokens ring boundary, TFQ5 split-K count) #5814.
    • zig fmt --check build.zig zig and git diff --check origin/main HEAD: clean.
  • Tests run on Linux (arm64, Zig 0.17.0), on the base with this head's diff applied:
    • zig build test-cuda-host --summary all: 12025 passed, 0 failed, 53 skipped.
    • zig build test-inkling2-hip-host -Dhip=true --summary all: 121 passed, 0 failed, 2 skipped.
  • Fail before, pass after: with this head's tests on the base's fixtures, Small's parse test fails (expected 8192, found 128000); with this head's reference tests and floor_pos left at 128000, the tau pin fails at position 8192 (0x3ff0000ccc999aab expected, 0x3ff0000000000000 found). The other edited test lines (exl3_pack_test.zig, tauAt at 128000, tau(8190)) hold on both values.
  • The fixture tool, with transformers 5.20.0, tokenizers 0.23.3 and jinja2 3.1.6: on the base with the files of 2ad1157, --check reports all 13 files same; on this head with the files of 885d78bf, all 13 same. Its other inputs were tiny-random/inkling-2@0a57c72e (its files whole), and extracted safetensors headers for hf-internal-testing/tiny-inkling2-mini@ee242a48 and thinkingmachines/Inkling-2-Mini@ed40e7da.
  • The tau pins are float64 values from Zig 0.17.0's @log; a Python math.log cross-check gives the same four bit patterns, and the same method reproduces the four patterns main pins for 128000.
  • GPU, one DGX Spark (GB10, driver 580.178.04, nvcc 13.0.88): zig build install-cuda-contract-runner -Dnvcc=/usr/local/cuda/bin/nvcc, then tf-cuda-test kernel-contract "inkling2 attn", on the base f25ae9711 and on the base with this head's diff applied. Both runs exit 0 with the same result: (filtered) SUMMARY 7 kernels: 7 pass gates 1-4, 0 fail, 0 known findings; 5 controls: 5 red as planted, 0 missed; 0 limit problems. The "without tau" control's first output is 2.9375 in both runs; the float64 value it is held to moves from 3.1875 to 4.
  • CI: runs when this pull request is updated; not run by us.
  • Not run, and why:
    • zig build test test-golden: not attempted; the macOS machine used has 23 GiB of free disk.
    • The Metal kernel contract on a GPU: not run; its Inkling 2 entries take tau from their own reference (above).

Receipt

n/a: the change cannot reach inference. It moves a pinned revision, test fixtures, a contract reference constant and tests; serving reads log_scaling_n_floor from the checkpoint's config, and admitSource, the one non-test function that embeds the pinned config, has no caller outside tests on main.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

@Nipale-ai
Nipale-ai marked this pull request as ready for review December 3, 2026 18:44
@ashhart ashhart added kind:refactor Classified by Synthena as refactor or cleanup synthena:needs-device Initial diff review passed; waiting for device and slowdown check before READY labels Dec 4, 2026
@ashhart

ashhart commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Synthena Initial Review — Initial diff check passed (awaiting device run) (kind:refactor)

Moves the Inkling 2 Small fixture pin to revision 885d78bf and updates log_scaling_n_floor from 128000 to 8192 across fixtures, tests, and the attention contract reference, keeping the old floor covered by tauAt tests.

  • Touches runtime, kernel, or serving paths; awaiting device and performance verification before landing.
  • Synthena

@ashhart

ashhart commented Dec 4, 2026

Copy link
Copy Markdown
Owner

I applied both commits onto the current #4841 serving head. The combined checkout exposed one stale assertion in zig/src/families/inkling2/shape.zig: it expects 128,000 from the updated Small fixture. With the assertion set to 8,192, 142 CUDA-family host tests and 21 focused attention-reference tests pass. shape.zig is introduced by #4841, so the one-line adjustment belongs on the serving side when the two changes are combined. Mia's pinned pack also reports 8,192, and the paired device check includes a 16,384-token prompt.

  • Synthena

@ashhart

ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner

READY to land on this head. Read-only review found no problems: the Inkling 2 Small fixtures pin revision 885d78bf and the contract reference uses Small's and Mini's log-scaling floor (8,192), with both floors still admitted; serving reads the same values as before. The train runs the M3 Ultra and GB10 regression cells before landing.

  • Synthena

@ashhart ashhart added synthena:ready Reviewed by Synthena and ready for group train and removed synthena:needs-device Initial diff review passed; waiting for device and slowdown check before READY labels Dec 5, 2026
Nipale-ai and others added 3 commits December 5, 2026 23:40
…oor 8192

tools/zig/inkling2_fixtures.py names thinkingmachines/Inkling-2-Small at
885d78bfca61a7e9a498e33cfa7ad35850533b8c and rebuilds the fixtures from it:
config.json (log_scaling_n_floor 8192), chat_template.jinja (generation
markers) and prompt_cases.json (its files line; prompts and ids unchanged).
The EXL3 admission test takes the release's 8192 and keeps 128000 as the
second admitted floor.

Refs ashhart#3476
floor_pos follows the release's log_scaling_n_floor; the tau pins move to
positions 8191, 8192, 300000 and 1048575, and tauAt keeps a second floor
(128000) under test.

Refs ashhart#3476
@ashhart
ashhart merged commit 1d5dd9b into ashhart:main Dec 5, 2026
8 of 12 checks passed
@ashhart

ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Thank you @Nipale-ai. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

ashhart added a commit to joshuaswarren/TensorFold that referenced this pull request Dec 5, 2026
ashhart added a commit that referenced this pull request Dec 5, 2026
ashhart added a commit to Nipale-ai/TensorFold that referenced this pull request Dec 5, 2026
ashhart added a commit that referenced this pull request Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:refactor Classified by Synthena as refactor or cleanup synthena:ready Reviewed by Synthena and ready for group train

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants